package com.hmall.user;

import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.crypto.password.PasswordEncoder;

@SpringBootTest
public class UpdateUserPassword {
    
    @Autowired
    private PasswordEncoder passwordEncoder;
    
    @Test
    public void updatePassword() {
        String rawPassword = "123456";
        String encodedPassword = passwordEncoder.encode(rawPassword);
        System.out.println("新密码: " + encodedPassword);
        // 使用这个输出的密码更新数据库
    }
}
